const Koa = require('koa');
const bodyParser = require('koa-bodyparser');
const mount=require('koa-mount')
const service=require('koa-static')
const cors=require('koa-cors')
const path=require('path')
const staticPath=path.join(__dirname,'app','pull')
const router=require('./app/router')
const app = new Koa();


app.use(bodyParser())
app.use(router)
app.use(cors({origin:'*'}))
app.use(mount('/myWeb',service(staticPath)))

app.listen(3000,()=>{
    console.log('http://localhost:3000');
});

